<?php
/**
 *
 * @package    gadgets
 * @subpackage feature
 * @author     Daniel Botelho <botelho.daniel@gmail.com>
 */
class GadgetsWindow
{
  const DEFAULT_CLASS = 'gadgets.window';
  
  /**
   * Adjusts the gadget height
   */
  public static function adjustHeight($opt_height=null,$appendable=null)
  {
  	OSConfig::importFeatureDynamicHeight();
  	$html = "gadgets.window.adjustHeight($opt_height)";
  	if(!$appendable)
  	  $html .= ";\n";
  	return $html;
  }
    
  /**
   * Sets the gadget title.
   */
  public static function setTitle($title,$appendable)
  {
  	OSConfig::importSetTitle();
  	$html = "gadgets.window.setTitle($title)";
  	if(!$appendable)
  	  $html .= ";\n";
  	return $html;
  }
  
  /**
   * Detects the inner dimensions of a frame. See: http://www.quirksmode.org/viewport/compatibility.html for more information.
   */
  public static function getViewportDimensions($appendable)
  {
  	$html = "gadgets.window.getViewportDimensions()";
  	if(!$appendable)
  	  $html .= ";\n";
  	return $html;
  }
    
}